package com.example.service.impl;

import com.example.mapper.UserMapper;
import com.example.pojo.User;
import com.example.service.UserService;
import com.example.web.annotation.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: springboot_course
 * @description: User服务实现层
 * @author: ChenZhiXiang
 * @create: 2019-06-12 09:59
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    @DataSource(value = "secondDataSource")
    public void find() {
        User user = userMapper.find(1);
        System.out.println("User****"+user.toString());
    }
}
